package router

import (
	"broker/interface/iserver"
)

/**
 * @Description
 * @Author huan.wang
 * @Date 2021/4/25 12:03 上午
 **/

type DisConnectRouter struct {
	BaseRouter
}

func NewDisConnectRouter() *DisConnectRouter {
	return &DisConnectRouter{}
}

func (d DisConnectRouter) Handle(request iserver.IRequest, param interface{}) interface{} {
	request.GetConnection().GetTcpServer().CallOnConnStop(request.GetConnection())
	go request.GetConnection().Stop()
	return nil
}
